home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
dat13c.zip
/
DAT.DOC
< prev
next >
Wrap
Text File
|
1994-03-08
|
6KB
|
183 lines
DAT, v1.3
-------------
from TifaWARE
What's New
----------
With version 1.3 I have substantially reorganized DAT's source code,
placing commonly-used procedures, equates, and macros in separate files.
Sharing code in this way will make it my programming task easier. From the
user's point of view, however, there should be no change.
Many of the principal functions in DAT have been completely rewritten
for version 1.2.
New to version 1.1 is the '-n' option, used to suppress display of
the final newline sequence. It will come in handy if you wish to mix
output from both DAT and some other program.
Introduction
------------
Ever wish you could keep track of program usage? Ever want to display
the current date and time without having to hit <Enter>? Ever hope for
something better than "ECHO.|DATE" and "ECHO.|TIME", something that would
give you more control over the output format? If so, then DAT is the
answer for you.
DAT is a simple utility to display the current date and time
preceeded by an optional message. Its output can be redirected to a file
thereby enabling you to track easily program and system usage.
Usage
-----
Running this program is a breeze. Once you've placed DAT.COM where
DOS can find it, type DAT -? to display a brief help message similar to
the following:
TifaWARE DAT, v1.3a, 08/28/90 - displays the current date and time.
Usage: dat [-options] [msg]
Options:
-d = display date
-n = suppress final newline sequence
-t = display time
-? = display this help message
msg is an optional message to display before the date or time.
[If you don't remember anything else, at least remember how to display
this help message.]
To see the current date and time invoke DAT with the '-d' and '-t'
options. DAT displays any specified message text, the date and time as
requested, and then terminates output with a newline (CR/LF). For example,
"DAT -t The time is now" generates the message "The time is now 19:00".
As special cases, "DAT" is equivalent to "DAT -dt", while "DAT some
message text" displays only "some message text".
If you're mixing DAT's output with that of another program and need to
skip the final CR/LF combination, use the '-n' option.
You can redirect DAT's output to a file, printer, or even another
program using DOS' redirection characters '>', '>>', and '|'. For example,
you could log usage of Quattro Pro with the following batch file:
echo off
DAT -dt QPro started: >> QPro.Log
Q
DAT -dt QPro ended: >> QPro.Log
Notice that you should use '>>' rather than '>' unless you don't mind
overwriting whatever might already be in QPro.Log.
If You Have Any Trouble
-----------------------
DAT will let you know of any problems that arise. Here is the only
error message you might see and how you should deal with it:
dat: illegal option -- x.
- Type "DAT -?" for a list of valid options.
This message appears on the standard error device. In this way, it won't
disappear down a pipe or into a file should you redirect DAT's output.
Additionally, DAT uses a return code to convey information about the
success or failure of its operation. Possible return values are:
Code Meaning
---- -------
0 Program completed successfully
1 Help message was displayed
You can test for these codes using the ERRORLEVEL variable in a batch file.
Requirements
------------
TifaWARE DAT runs on machines operating under DOS v2.xx or later, and
requires practically no memory. It does not use BIOS calls, make direct
writes to video RAM, or otherwise require machines to be "PC-compatible".
In fact, DAT even runs properly on a DEC Rainbow!
Who Owns It?
---------------
I am releasing this program into the public domain. Since 1984 I have
used public-domain software extensively, and I find it to be a terrific
idea. Most programs are useful, and the source instructive. And they cost
nothing! With this small contribution to the public domain I hope to pay
back my gratitude to those other programmers who have made my computing so
much easier.
However, this program carries no obligation on my part to support
users or provide future upgrades. I try to write clean code and believe it
is "bug-free". Nevertheless, use this program ***AT YOUR OWN RISK***. Scan
the source yourself, make any desired changes, and recompile the program,
if possible. Make this standard practice with newly-acquired software and
you'll not only protect your system from viruses but also get a better
feel for exactly how programs work!
As author of this program, I have two requests: First, please keep
together the original source code, documentation, and executable if you
distribute the package. This just makes it easier for others to use the
software. Second, let me hear what you think of it - I'd appreciate a
postcard with your comments. Enjoy!
Kudos
-----
Thanks to Ron Brandt of SATALINK BBS who inspired me to develop this
program. Ron runs a fantastic bulletin board; call it at +1 215 443-9434.
George A. Theall
TifaWARE
610 South 48th St
Philadelphia, PA. 19143
U.S.A.
george@tifaware.com
theall@popmail.tju.edu
theall@mcneil.sas.upenn.edu
george.theall@satalink.com